package bulletbehavior 
{
	/**
	 * ...
	 * @author morgan
	 */
	public class WaveBehaviorAngular extends RotateBehavior
	{
		
		public var period:Number;
		public var amplitude:Number;
		public var offset:Number;
		public function WaveBehaviorAngular(period:Number, amplitude:Number, offset:Number) 
		{
			super(0, 0);
			this.period = period;
			this.amplitude = amplitude;
			this.offset = offset;
		}
		
		override public function onUpdate(b:Bullet):void 
		{
			rotate(b, Math.cos((b.age * Math.PI * 2 / period) + offset) * (amplitude / 180 * 3.14159));
		}
		
	}

}